namespace ClassyBlog.DomainObjects.Specs.Unit
{
    using System;

    using Machine.Specifications;

    [Subject(typeof(Tag))]
    public class when_tag_is_created
    {
        static Tag tag;

        Because of = () => tag = new Tag();

        It should_have_id = () => tag.Id.ShouldNotEqual(Guid.Empty);
    }

    [Subject(typeof(Tag))]
    public class when_tag_id_is_set
    {
        static Tag tag;
        static Guid id;

        Establish context = () =>
        {
            tag = new Tag();
            id = Guid.NewGuid();
        };

        Because of = () => tag.Id = id;

        It should_return_the_same = () => tag.Id.ShouldEqual(id);
    }
}